package io.renren.modules.user.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.user.dao.TApplyRecordDao;
import io.renren.modules.user.entity.TApplyRecordEntity;
import io.renren.modules.user.service.TApplyRecordService;


@Service("tApplyRecordService")
public class TApplyRecordServiceImpl extends ServiceImpl<TApplyRecordDao, TApplyRecordEntity> implements TApplyRecordService {

    @Autowired
    private TApplyRecordDao tApplyRecordDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TApplyRecordEntity> page = this.page(
                new Query<TApplyRecordEntity>().getPage(params),
                new QueryWrapper<TApplyRecordEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<TApplyRecordEntity> findApplyById(TApplyRecordEntity recordEntity) {
        List<TApplyRecordEntity> applyById = tApplyRecordDao.findApplyById(recordEntity);
        return applyById;
    }

}